/**
 * 
 */
package org.ranch.model;

import javax.persistence.Column;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import org.hibernate.annotations.GenericGenerator;

/**
 * Base class for all Data Objects in the application.
 * 
 */
@MappedSuperclass
public class BaseData {

    /**
     * unique ID for the objects.
     */
    private String id;
    private RecordStatus recordStatus = RecordStatus.ACTIVE;

    /**
     * 
     */
    public BaseData() {
	// TODO Auto-generated constructor stub
    }

    /**
     * @return the id
     */
    @Id
    @GeneratedValue(generator="system-uuid")
    @GenericGenerator(name="system-uuid", strategy="uuid")
    public String getId() {
	return id;
    }

    /**
     * @param id
     *            the id to set
     */
    public void setId(String id) {
	this.id = id;
    }

    /**
     * @return the recordStatus
     */
    @Enumerated(EnumType.ORDINAL)
    @Column(name="record_status", nullable=false)
    public RecordStatus getRecordStatus() {
	return recordStatus;
    }

    /**
     * @param recordStatus
     *            the recordStatus to set
     */
    public void setRecordStatus(RecordStatus recordStatus) {
	this.recordStatus = recordStatus;
    }
}
